package cn.com.ccxe.web.form;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.StringUtils;

import com.ccxe.manage.service.CurrUserInfo;

public class SearchActionForm extends ActionForm{

	private String 			method;
	private CurrUserInfo 	userInfo;
	private String 			keyword;
	private String 			beginDate;
	private String 			endDate;
	private int    			isSearchContent;
	private int    			moduleId;
	private int 			currentPage;
	private int				requestPage;
	
	
	public SearchActionForm(HttpServletRequest request) {
		super(request);
	}

	@Override
	protected void reset() {
		this.method = getParemetes("method");
		this.userInfo = (CurrUserInfo) getAttribute("currUser");
		this.keyword = getParemetes("keyword");
		this.beginDate = getParemetes("beginDate");
		this.endDate = getParemetes("endDate");
		String isSearchContent_str = getParemetes("isSearchContent");
		if(!StringUtils.isEmpty(isSearchContent_str)) {
			this.isSearchContent = Integer.valueOf(isSearchContent_str);
		} else {
			this.isSearchContent = 0;
		}
		String moduleId_str = getParemetes("moduleId");
		if(!StringUtils.isEmpty(moduleId_str)) {
			this.moduleId = Integer.valueOf(moduleId_str);
		}
		String currentPage_str = getParemetes("currentPage");
		if(!StringUtils.isEmpty(currentPage_str)) {
			this.currentPage = Integer.valueOf(currentPage_str);
		}
		String requestPage_str = getParemetes("requestPage");
		if(!StringUtils.isEmpty(requestPage_str)) {
			this.requestPage = Integer.valueOf(requestPage_str);
		}
	}

	public String getMethod() {
		return method;
	}
	public CurrUserInfo getUserInfo() {
		return userInfo;
	}
	public String getKeyword() {
		return keyword;
	}
	public String getBeginDate() {
		return beginDate;
	}
	public String getEndDate() {
		return endDate;
	}
	public int getIsSearchContent() {
		return isSearchContent;
	}
	public int getModuleId() {
		return moduleId;
	}
	public int getCurrentPage() {
		return currentPage;
	}
	public int getRequestPage() {
		return requestPage;
	}
}
